home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / boot / netBoot / sun3.md / cpu.addrs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-14  |  5.2 KB  |  134 lines

  1.  
  2. /*      @(#)cpu.addrs.h 1.1 86/09/27 SMI      */
  3.  
  4. /*
  5.  * Copyright (c) 1986 by Sun Microsystems, Inc.
  6.  */
  7.  
  8. /*
  9.  * Memory Addresses of Interest in the Sun-3 "Monitor" memory map
  10.  *
  11.  * THE VALUE FOR PROM_BASE must be changed in several places when it is
  12.  * changed.  A complete list:
  13.  *    ../conf/Makefile.mon    RELOC= near top of file
  14.  *    ../h/sunromvec.h    #define romp near end of file
  15.  *    ../* /Makefile        (best to rerun sunconfig to generate them)
  16.  * Since sunromvec is exported to the world, such a change invalidates all
  17.  * object programs that use it (eg standalone diagnostics, demos, boot code,
  18.  * etc) until they are recompiled.  As a transition aid, it is often useful
  19.  * to specially map the old sunromvec location(s) so they also work.
  20.  *
  21.  * THE VALUE FOR MONBSS_BASE must be changed in the Makefiles when you
  22.  * change it here, too.
  23.  */
  24.  
  25. /*
  26.  * The following define the base addresses in mappable memory where
  27.  * the various devices and forms of memory are mapped in when the ROM
  28.  * Monitor powers up.  Ongoing operation of the monitor requires that
  29.  * these locations remain mapped as they were.
  30.  */
  31.  
  32. /* On-board I/O devices */
  33. #define    KEYBMOUSE_BASE    ((struct zscc_device *)        0x0FE00000)
  34. #define    SERIAL0_BASE    ((struct zscc_device *)        0x0FE02000)
  35. #define    EEPROM_BASE    ((unsigned char *)        0x0FE04000)
  36. #define    CLOCK_BASE    ((struct intersil7170 *)    0x0FE06000)
  37. #define    MEMORY_ERR_BASE    ((struct memreg *)        0x0FE08000)
  38. #define    INTERRUPT_BASE    ((unsigned char *)        0x0FE0A000)
  39. #define    ETHER_BASE    ((struct obie_device *)        0x0FE0C000)
  40. #define    COLORMAP_BASE    ((struct obcolormap *)        0x0FE0E000)
  41. #define    AMD_ETHER_BASE    ((struct amd_ether *)        0x0FE10000)
  42. #define    SCSI_BASE    ((struct scsichip *)        0x0FE12000)
  43. #define    DES_BASE    ((struct deschip *)        0x0FE14000)
  44. #define    ECC_CTRL_BASE    ((struct ecc_ctrl *)        0x0FE16000)
  45.  
  46. /* Video memory (at least one plane of it...) */
  47. #define    VIDEOMEM_BASE    ((char *)            0x0FE20000)
  48.  
  49. /*****************************************************************************/
  50. #ifdef PRISM
  51. #define BW_ENABLE_MEM_BASE    ((char *)        0x0FE40000)
  52. #define PRISM_CFB_BASE        ((char *)        0x0FD00000)
  53. #define PRISM_CFB_SIZE                    0x100000
  54. #define COLORMAP_SIZE                    0x100
  55. #endif PRISM
  56. /*****************************************************************************/
  57.  
  58. #define INVPMEG_BASE    ((char *)                       0x0FEC0000)
  59.  
  60. /*
  61.  * Monitor scratch RAM for stack, trap vectors, and expanded font
  62.  * (one page = 8K)
  63.  */
  64. #define    STACK_BASE    ((char *)            0x0FE60000)
  65. #define    STACK_TOP    ((char *)            0x0FE60C00)
  66. #define    TRAPVECTOR_BASE    ((char *)            0x0FE60C00)
  67. #define    FONT_BASE    ((char *)            0x0FE61000)
  68.  
  69. /*
  70.  * RAM page used to hold the valid-main-memory-pages bitmap if memory
  71.  * fails self-test.  This will be mapped invalid if memory was all OK.
  72.  */
  73. #define    MAINMEM_BITMAP    ((char *)            0x0FE62000)
  74.  
  75. /*
  76.  * Roughly 512K for mapping in devices & mainmem during boot
  77.  * Mapped Invalid otherwise (to Invalid PMEG if a whole pmeg invalid).
  78.  */
  79. #define    BOOTMAP_BASE    ((char *)            0x0FE64000)
  80.  
  81. /*
  82.  * Location of PROM code.  The system executes out of these addresses.
  83.  *
  84.  * SEE NOTE AT TOP OF FILE IF YOU CHANGE THIS VALUE.
  85.  */
  86. #define    PROM_BASE    ((struct sunromvec *)        0x0FEF0000)
  87.  
  88. /*
  89.  * First hardware virtual address where DVMA is possible.
  90.  * The Monitor does not normally use this address range, but does
  91.  * use it during bootstrap, via the resalloc() routine.
  92.  */
  93. #define    DVMA_BASE    ((char *)            0x0FF00000)
  94.  
  95. /*
  96.  * One page of scratch RAM for general Monitor global variables.
  97.  * We put it here so it can be accessed with short absolute addresses.
  98.  *
  99.  * SEE NOTE AT TOP OF FILE IF YOU CHANGE THIS VALUE.
  100.  */
  101. #define    MONBSS_BASE    MONSHORTPAGE
  102.  
  103. /*
  104.  * The Monitor maps only as much main memory as it can detect; the rest
  105.  * of the address space (up thru the special addresses defined above)
  106.  * is mapped as invalid.
  107.  *
  108.  * The last pmeg in the page map is always filled with PME_INVALID
  109.  * entries.  This pmeg number ("The Invalid Pmeg Number") can be used to
  110.  * invalidate an entire segment's worth of memory.
  111.  *        B E   C A R E F U L !
  112.  * If you change a page map entry in this pmeg, you change it for thousands
  113.  * of virtual addresses.  (The standard getpagemap/setpagemap routines
  114.  * will cause a trap if you attempt to write a valid page map entry to this
  115.  * pmeg, but you could do it by hand if you really wanted to mess things up.)
  116.  *
  117.  * Because there is four times as much virtual memory space in a single context
  118.  * as there are total pmegs to map it with, much of the monitor's memory
  119.  * map must be re-mappings of the same pmegs.  There's no reason to duplicate
  120.  * useful addresses, and several reasons not to, so we map the extra
  121.  * virtual address space with the Invalid Pmeg Number.  This means that
  122.  * some of the address space has their own page map entries, and the other
  123.  * part all shares the one Invalid Pmeg.  Remember this when trying to map 
  124.  * things; if the address you want is segmapped to the Invalid Pmeg, you'd
  125.  * better find it a pmeg before you set a page map entry.
  126.  *
  127.  * The Monitor always uses page map entry PME_INVALID to map an invalid
  128.  * page, although the only relevant bits are the (nonzero) permission bits
  129.  * and the (zero) Valid bit.  PME_INVALID is defined in ./structconst.h,
  130.  * which is generated by the Monitor makefile.
  131.  */
  132. #define    SEG_INVALID    NUMPMEGS-1
  133. #define EEPROM    ((struct eeprom *)0x0FE04000)
  134.